//
//  Patient.m
//  WCN
//
//  Created by 杨鑫 on 15/6/23.
//  Copyright (c) 2015年 ShanghaiCize Trade And Business Co., Ltd. All rights reserved.
//

#import "Patient.h"

@implementation Patient

@dynamic orderId;
@dynamic stringId;
@dynamic age;
@dynamic name;
@dynamic sex;

@dynamic nursingType;
@dynamic nursingTypeName;

@dynamic hosPatientNo;
@dynamic hosBedNo;
@dynamic hosWardId;
@dynamic hosWardName;

@dynamic address;
@dynamic contactType;
@dynamic contactPhone;

@dynamic nursingStatus;
@dynamic nursingStatusName;
@dynamic nursingLevel;

@dynamic diagnosis;
@dynamic woundDesc;

@dynamic mainNurse;
@dynamic nurseMembers,birthday;

@dynamic isDiabetes,albumin;
@end

@implementation Patient (CoreDataGeneratedAccessors)

- (void)addNurseMembersObject:(Nurse *)value
{
    NSMutableSet *muSet = [NSMutableSet setWithSet:self.nurseMembers];
    [muSet addObject:value];
    
    self.nurseMembers = [muSet copy];
}

- (void)removeNurseMembersObject:(Nurse *)value
{
    NSMutableSet *muSet = [NSMutableSet setWithSet:self.nurseMembers];
    [muSet removeObject:value];
    
    self.nurseMembers = [muSet copy];
}

- (void)addNurseMembers:(NSSet *)values
{
    self.nurseMembers = [self.nurseMembers setByAddingObjectsFromSet:values];
}

- (void)removeNurseMembers:(NSSet *)values
{
    NSMutableSet *muSet = [NSMutableSet setWithSet:self.nurseMembers];
    for (id item in values) {
        [muSet removeObject:item];
    }
    
    self.nurseMembers = [muSet copy];
}


- (void)pastPatientModelToPatient:(WCNPastPatientModel *)model
{
    self.nursingStatus = model.nursingStatus;
    self.nursingLevel  =model.nursingLevel;
    self.name = model.name;
    self.stringId =model.id;
    self.woundDesc = model.woundDesc;
  
}

 

@end